package marcis.jarina.hibernate.services;

import marcis.jarina.hibernate.dao.ArchiveDao;
import marcis.jarina.hibernate.entities.Archive;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;
import java.util.Map;

@Transactional
public class ArchiveService implements CommonService<Archive> {

    @Autowired
    private ArchiveDao archiveDao;


    @Override
    public void save(Archive archive) {
        archiveDao.save(archive);
    }

    @Override
    @Transactional(readOnly = true)
    public Archive load(Integer id) {
        return archiveDao.loadById(id);
    }

    @Override
    @Transactional(readOnly = true)
    public List<Archive> loadList(Map<String, Object> propertyFilter) {
        return null;  //To change body of implemented methods use File | Settings | File Templates.
    }
}
